pub mod logger;
pub mod config;

pub use config::LogConfig;

pub use logger::minutely;
pub use logger::hourly;
pub use logger::daily;
pub use logger::never;

use self::non_blocking::{NonBlocking, WorkerGuard};

use std::io::Write;

pub mod non_blocking;

mod worker;

pub(crate) mod sync;
// mod logger1;

pub fn non_blocking<T: Write + Send + Sync + 'static>(writer: T) -> (NonBlocking, WorkerGuard) {
    NonBlocking::new(writer)
}

#[derive(Debug)]
pub(crate) enum Msg {
    Line(Vec<u8>),
    Shutdown,
}